package store.lunangangster.bpmn.converter;

import javax.xml.stream.XMLStreamReader;
import store.lunangangster.bpmn.model.BaseElement;
import store.lunangangster.bpmn.model.BpmnModel;
import store.lunangangster.bpmn.model.EndEvent;
import store.lunangangster.bpmn.util.BpmnXmlUtil;

public class EndEventConverter extends EventConverter {

  @Override
  protected BaseElement convertToElement(XMLStreamReader xsr, BpmnModel model) throws Exception {
    EndEvent endEvent = null;

    endEvent = new EndEvent();

    BpmnXmlUtil.addXmlLocation(xsr, endEvent);

    return endEvent;
  }

  @Override
  public String getTargetName() {
    return ELEMENT_EVENT_END;
  }
}
